package org.jin.samples.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "exam_test")
public class ExamTest implements Serializable{

	private static final long serialVersionUID = -2556458585406595483L;
	
	@Id
	@GeneratedValue
	@Column(name = "id", nullable = false)
	private Integer id;
	
	@Column(name = "content", length = 225, nullable = false)
	private String content;
	
	@Column(name = "choose_a", length = 225, nullable = false)
	private String chooseA;
	
	@Column(name = "choose_b", length = 225, nullable = false)
	private String chooseB;
	
	@Column(name = "choose_c", length = 225, nullable = false)
	private String chooseC;
	
	@Column(name = "choose_d", length = 225, nullable = false)
	private String chooseD;
	
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name = "sub_id")
	private ExamSubject examSubject;
	
	@Column(name = "answer", length = 225, nullable = false)
	private String answer;
		
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name = "test_type_id")
	private ExamTestType examTestType;
	
	/*@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	private ExamSubject examSubject;*/
	
	public ExamTest() {
		super();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getChooseA() {
		return chooseA;
	}

	public void setChooseA(String chooseA) {
		this.chooseA = chooseA;
	}

	public String getChooseB() {
		return chooseB;
	}

	public void setChooseB(String chooseB) {
		this.chooseB = chooseB;
	}

	public String getChooseC() {
		return chooseC;
	}

	public void setChooseC(String chooseC) {
		this.chooseC = chooseC;
	}

	public String getChooseD() {
		return chooseD;
	}

	public void setChooseD(String chooseD) {
		this.chooseD = chooseD;
	}


	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public ExamTestType getExamTestType() {
		return examTestType;
	}

	public void setExamTestType(ExamTestType examTestType) {
		this.examTestType = examTestType;
	}

	public ExamSubject getExamSubject() {
		return examSubject;
	}

	public void setExamSubject(ExamSubject examSubject) {
		this.examSubject = examSubject;
	}
	
	
	
}
